import {Navigate} from "react-router-dom";
import {message} from "antd";


export const AuthRoute =({children}) => {
    let token = window.localStorage.getItem('token')

    if (true){
        return (
            <>
                {children}
            </>
        )
    }else {
        message.info('请先输入正确的验证码哦')
        return <Navigate to={'/'} replace></Navigate>
    }
}

